using UnityEngine;
using System.Collections;

public class UpdriftForce : MonoBehaviour
{
	public Vector3 force;
	public Vector3 worldForce;
	public ForceMode mode;

	void Update()
	{

	}
	void OnTriggerStay(Collider col)
	{
		if (col.attachedRigidbody)
		{

			col.attachedRigidbody.AddForce(transform.TransformDirection(force), mode);
			col.attachedRigidbody.AddForce(worldForce, mode);
		}
	}

	void OnDrawGizmosSelected()
	{
		Gizmos.color = Color.cyan;
		Gizmos.DrawLine(transform.position, transform.position + transform.TransformDirection(force) + worldForce);
	}
}
